<?php
	if(!defined('BASEPATH'))
		exit('No direct script access allowed');

	class m_VendorHome extends CI_Model
	{
		function __construct()
    	{
    	    // Call the Model constructor
    	    parent::__construct();
    	}
		
		function login($userEmail, $userPassword)
		{
			$result = '';
			$this->load->database();
			$query = $this->db->get_where('tblVendorUser', array('userEmail' => $userEmail));
			if($query->num_rows > 0)
			{
				if (crypt($userPassword, $query->row()->userPassword) == $query->row()->userPassword)
				{
					$result = $query->row()->userEmail;
				}
			}
			return $result;
		}
	}
?>
